package com.czh.enums;
//枚举
public enum AppHttpCodeEnum {
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NEED_LOGIN2(402,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名和密码"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    FILE_TYPE_ERROR(506, "文件类型错误"),
    PARAM_INVALID(507, "谁批准你直接连后端的?"),
    USERNAME_NOT_NULL(508, "用户名不能为空"),
    PASSWORD_NOT_NULL(509, "密码不能为空"),
    EMAIL_NOT_NULL(510, "邮箱不能为空"),
    NICKNAME_NOT_NULL(511, "昵称不能为空"),
    UPLOAD_ERROR(512, "上传失败"),
    COMMENT_NOT_NULL(513, "评论不能为空"),
    DELETE_ERROR(514, "删除失败"),
    UPDATE_ERROR(515, "不能与父菜单相同"),
    WEATHER_ERROR(516,"获取天气失败!"),
    LOCALHOST(417,"目前是本地运行!"),
    MESSAGE_ERROR(518,"留言不能为空!");
    final int code;
    final String msg;

    AppHttpCodeEnum(int code, String Message){
        this.code = code;
        this.msg = Message;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
